| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::GlobalTimer Class Reference

A timer, giving timing capabilities. More...

## Public Member Functions
| GlobalTimer () noexcept
void | setModuloTime (unsigned long long moduloTime)
void | updateFrameTime ()
unsigned long long | getDeltaTime () const
unsigned long long | getFrameTime () const
unsigned long long | getCurrentModuloTime () const
unsigned long long | getCurrentModulo () const
bool | getLoopedSinceLastTime () const
int | getCurrentYear ()
int | getCurrentMonth ()
int | getCurrentDay ()
int | getCurrentHour ()
int | getCurrentMin ()
int | getCurrentSec ()

## Detailed Description

A timer, giving timing capabilities.

## Constructor & Destructor Documentation

## ◆ GlobalTimer()

nkGraphics::GlobalTimer::GlobalTimer | ( |  | ) |
| noexcept

Constructor.

## Member Function Documentation

## ◆ setModuloTime()

void nkGraphics::GlobalTimer::setModuloTime | ( | unsigned long long | moduloTime | ) |

Sets the time modulo the timer will have. In a nutshell, timer will loop its time according to this modulo : [0, modulo].

Parameters

  moduloTime | The modulo to use.

## ◆ updateFrameTime()

void nkGraphics::GlobalTimer::updateFrameTime | ( |  | ) |

Updates the frame time.

## ◆ getDeltaTime()

unsigned long long nkGraphics::GlobalTimer::getDeltaTime | ( |  | ) | const

Returns
  The delta time between the two last updates.

## ◆ getFrameTime()

unsigned long long nkGraphics::GlobalTimer::getFrameTime | ( |  | ) | const

The frame time, corresponding to the absolute time counter.

## ◆ getCurrentModuloTime()

unsigned long long nkGraphics::GlobalTimer::getCurrentModuloTime | ( |  | ) | const

Returns
  The current modulo time, aka the frame time % modulo.

## ◆ getCurrentModulo()

unsigned long long nkGraphics::GlobalTimer::getCurrentModulo | ( |  | ) | const

Returns
  The modulo currently applied.

## ◆ getLoopedSinceLastTime()

bool nkGraphics::GlobalTimer::getLoopedSinceLastTime | ( |  | ) | const

Returns
  If the last update, while updating the time, made a loop based on the modulo.

## ◆ getCurrentYear()

int nkGraphics::GlobalTimer::getCurrentYear | ( |  | ) |

Returns
  The year.

## ◆ getCurrentMonth()

int nkGraphics::GlobalTimer::getCurrentMonth | ( |  | ) |

Returns
  The month.

## ◆ getCurrentDay()

int nkGraphics::GlobalTimer::getCurrentDay | ( |  | ) |

Returns
  The day.

## ◆ getCurrentHour()

int nkGraphics::GlobalTimer::getCurrentHour | ( |  | ) |

Returns
  The hour.

## ◆ getCurrentMin()

int nkGraphics::GlobalTimer::getCurrentMin | ( |  | ) |

Returns
  The minute.

## ◆ getCurrentSec()

int nkGraphics::GlobalTimer::getCurrentSec | ( |  | ) |

Returns
  The seconds.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Time/GlobalTimer.h